package com.yunlankeji.stemcells.adapter;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.viewpager2.adapter.FragmentStateAdapter;

import com.yunlankeji.stemcells.fragemt.fragment_mine_personal_space_fans;
import com.yunlankeji.stemcells.fragemt.fragment_mine_personal_space_follow;

public class ScreenSlidePagerAdapter extends FragmentStateAdapter {
    private int NUM_PAGES = 3;
    public ScreenSlidePagerAdapter(FragmentActivity fa) {
        super(fa);
    }

    @Override
    public Fragment createFragment(int position) {

        switch (position)
        {
            case 0:
                return new fragment_mine_personal_space_follow();

            default:
                return new fragment_mine_personal_space_fans();

        }
    }

    @Override
    public int getItemCount() {
        return NUM_PAGES;
    }
}

